3.2.47 \(\int \frac {A+B \log (e (\frac {a+b x}{c+d x})^n)}{(a g+b g x) (c i+d i x)^2} \, dx\) [147]

3.2.47.1 Optimal result
3.2.47.2 Mathematica [C] (verified)
3.2.47.3 Rubi [A] (verified)
3.2.47.4 Maple [A] (verified)
3.2.47.5 Fricas [A] (verification not implemented)
3.2.47.6 Sympy [F(-1)]
3.2.47.7 Maxima [B] (verification not implemented)
3.2.47.8 Giac [A] (verification not implemented)
3.2.47.9 Mupad [B] (verification not implemented)

3.2.47.1 Optimal result

Integrand size = 43, antiderivative size = 166 \[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(a g+b g x) (c i+d i x)^2} \, dx=-\frac {A d (a+b x)}{(b c-a d)^2 g i^2 (c+d x)}+\frac {B d n (a+b x)}{(b c-a d)^2 g i^2 (c+d x)}-\frac {B d (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(b c-a d)^2 g i^2 (c+d x)}+\frac {b \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{2 B (b c-a d)^2 g i^2 n} \]

output
-A*d*(b*x+a)/(-a*d+b*c)^2/g/i^2/(d*x+c)+B*d*n*(b*x+a)/(-a*d+b*c)^2/g/i^2/( 
d*x+c)-B*d*(b*x+a)*ln(e*((b*x+a)/(d*x+c))^n)/(-a*d+b*c)^2/g/i^2/(d*x+c)+1/ 
2*b*(A+B*ln(e*((b*x+a)/(d*x+c))^n))^2/B/(-a*d+b*c)^2/g/i^2/n
 
3.2.47.2 Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.

Time = 0.16 (sec) , antiderivative size = 304, normalized size of antiderivative = 1.83 \[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(a g+b g x) (c i+d i x)^2} \, dx=\frac {2 (b c-a d) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )+2 b (c+d x) \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )-2 b (c+d x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)-2 B n (b c-a d+b (c+d x) \log (a+b x)-b (c+d x) \log (c+d x))-b B n (c+d x) \left (\log (a+b x) \left (\log (a+b x)-2 \log \left (\frac {b (c+d x)}{b c-a d}\right )\right )-2 \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{-b c+a d}\right )\right )+b B n (c+d x) \left (\left (2 \log \left (\frac {d (a+b x)}{-b c+a d}\right )-\log (c+d x)\right ) \log (c+d x)+2 \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{b c-a d}\right )\right )}{2 (b c-a d)^2 g i^2 (c+d x)} \]

input
Integrate[(A + B*Log[e*((a + b*x)/(c + d*x))^n])/((a*g + b*g*x)*(c*i + d*i 
*x)^2),x]
 
output
(2*(b*c - a*d)*(A + B*Log[e*((a + b*x)/(c + d*x))^n]) + 2*b*(c + d*x)*Log[ 
a + b*x]*(A + B*Log[e*((a + b*x)/(c + d*x))^n]) - 2*b*(c + d*x)*(A + B*Log 
[e*((a + b*x)/(c + d*x))^n])*Log[c + d*x] - 2*B*n*(b*c - a*d + b*(c + d*x) 
*Log[a + b*x] - b*(c + d*x)*Log[c + d*x]) - b*B*n*(c + d*x)*(Log[a + b*x]* 
(Log[a + b*x] - 2*Log[(b*(c + d*x))/(b*c - a*d)]) - 2*PolyLog[2, (d*(a + b 
*x))/(-(b*c) + a*d)]) + b*B*n*(c + d*x)*((2*Log[(d*(a + b*x))/(-(b*c) + a* 
d)] - Log[c + d*x])*Log[c + d*x] + 2*PolyLog[2, (b*(c + d*x))/(b*c - a*d)] 
))/(2*(b*c - a*d)^2*g*i^2*(c + d*x))
 
3.2.47.3 Rubi [A] (verified)

Time = 0.38 (sec) , antiderivative size = 119, normalized size of antiderivative = 0.72, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.093, Rules used = {2961, 2788, 2009, 2738}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A}{(a g+b g x) (c i+d i x)^2} \, dx\)

\(\Big \downarrow \) 2961

\(\displaystyle \frac {\int \frac {(c+d x) \left (b-\frac {d (a+b x)}{c+d x}\right ) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{a+b x}d\frac {a+b x}{c+d x}}{g i^2 (b c-a d)^2}\)

\(\Big \downarrow \) 2788

\(\displaystyle \frac {b \int \frac {(c+d x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{a+b x}d\frac {a+b x}{c+d x}-d \int \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )d\frac {a+b x}{c+d x}}{g i^2 (b c-a d)^2}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {b \int \frac {(c+d x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{a+b x}d\frac {a+b x}{c+d x}-d \left (\frac {A (a+b x)}{c+d x}+\frac {B (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{c+d x}-\frac {B n (a+b x)}{c+d x}\right )}{g i^2 (b c-a d)^2}\)

\(\Big \downarrow \) 2738

\(\displaystyle \frac {\frac {b \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{2 B n}-d \left (\frac {A (a+b x)}{c+d x}+\frac {B (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{c+d x}-\frac {B n (a+b x)}{c+d x}\right )}{g i^2 (b c-a d)^2}\)

input
Int[(A + B*Log[e*((a + b*x)/(c + d*x))^n])/((a*g + b*g*x)*(c*i + d*i*x)^2) 
,x]
 
output
((b*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2)/(2*B*n) - d*((A*(a + b*x))/( 
c + d*x) - (B*n*(a + b*x))/(c + d*x) + (B*(a + b*x)*Log[e*((a + b*x)/(c + 
d*x))^n])/(c + d*x)))/((b*c - a*d)^2*g*i^2)
 

3.2.47.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2738
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Lo 
g[c*x^n])^2/(2*b*n), x] /; FreeQ[{a, b, c, n}, x]
 

rule 2788
Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.)) 
/(x_), x_Symbol] :> Simp[d   Int[(d + e*x)^(q - 1)*((a + b*Log[c*x^n])^p/x) 
, x], x] + Simp[e   Int[(d + e*x)^(q - 1)*(a + b*Log[c*x^n])^p, x], x] /; F 
reeQ[{a, b, c, d, e, n}, x] && IGtQ[p, 0] && GtQ[q, 0] && IntegerQ[2*q]
 

rule 2961
Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*( 
B_.))^(p_.)*((f_.) + (g_.)*(x_))^(m_.)*((h_.) + (i_.)*(x_))^(q_.), x_Symbol 
] :> Simp[(b*c - a*d)^(m + q + 1)*(g/b)^m*(i/d)^q   Subst[Int[x^m*((A + B*L 
og[e*x^n])^p/(b - d*x)^(m + q + 2)), x], x, (a + b*x)/(c + d*x)], x] /; Fre 
eQ[{a, b, c, d, e, f, g, h, i, A, B, n, p}, x] && NeQ[b*c - a*d, 0] && EqQ[ 
b*f - a*g, 0] && EqQ[d*h - c*i, 0] && IntegersQ[m, q]
 
3.2.47.4 Maple [A] (verified)

Time = 4.76 (sec) , antiderivative size = 269, normalized size of antiderivative = 1.62

method result size
parallelrisch \(\frac {2 B a \,b^{2} d^{4} n^{2}-2 B \,b^{3} c \,d^{3} n^{2}-2 A a \,b^{2} d^{4} n +2 A \,b^{3} c \,d^{3} n +B x \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )^{2} b^{3} d^{4}+2 A x \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) b^{3} d^{4}+B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )^{2} b^{3} c \,d^{3}+2 A \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) b^{3} c \,d^{3}-2 B x \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) b^{3} d^{4} n -2 B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) a \,b^{2} d^{4} n}{2 i^{2} g \left (d x +c \right ) \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) b^{2} d^{3} n}\) \(269\)

input
int((A+B*ln(e*((b*x+a)/(d*x+c))^n))/(b*g*x+a*g)/(d*i*x+c*i)^2,x,method=_RE 
TURNVERBOSE)
 
output
1/2*(2*B*a*b^2*d^4*n^2-2*B*b^3*c*d^3*n^2-2*A*a*b^2*d^4*n+2*A*b^3*c*d^3*n+B 
*x*ln(e*((b*x+a)/(d*x+c))^n)^2*b^3*d^4+2*A*x*ln(e*((b*x+a)/(d*x+c))^n)*b^3 
*d^4+B*ln(e*((b*x+a)/(d*x+c))^n)^2*b^3*c*d^3+2*A*ln(e*((b*x+a)/(d*x+c))^n) 
*b^3*c*d^3-2*B*x*ln(e*((b*x+a)/(d*x+c))^n)*b^3*d^4*n-2*B*ln(e*((b*x+a)/(d* 
x+c))^n)*a*b^2*d^4*n)/i^2/g/(d*x+c)/(a^2*d^2-2*a*b*c*d+b^2*c^2)/b^2/d^3/n
 
3.2.47.5 Fricas [A] (verification not implemented)

Time = 0.33 (sec) , antiderivative size = 196, normalized size of antiderivative = 1.18 \[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(a g+b g x) (c i+d i x)^2} \, dx=\frac {2 \, A b c - 2 \, A a d + {\left (B b d n x + B b c n\right )} \log \left (\frac {b x + a}{d x + c}\right )^{2} - 2 \, {\left (B b c - B a d\right )} n + 2 \, {\left (B b c - B a d + {\left (B b d x + B b c\right )} \log \left (\frac {b x + a}{d x + c}\right )\right )} \log \left (e\right ) - 2 \, {\left (B a d n - A b c + {\left (B b d n - A b d\right )} x\right )} \log \left (\frac {b x + a}{d x + c}\right )}{2 \, {\left ({\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} g i^{2} x + {\left (b^{2} c^{3} - 2 \, a b c^{2} d + a^{2} c d^{2}\right )} g i^{2}\right )}} \]

input
integrate((A+B*log(e*((b*x+a)/(d*x+c))^n))/(b*g*x+a*g)/(d*i*x+c*i)^2,x, al 
gorithm="fricas")
 
output
1/2*(2*A*b*c - 2*A*a*d + (B*b*d*n*x + B*b*c*n)*log((b*x + a)/(d*x + c))^2 
- 2*(B*b*c - B*a*d)*n + 2*(B*b*c - B*a*d + (B*b*d*x + B*b*c)*log((b*x + a) 
/(d*x + c)))*log(e) - 2*(B*a*d*n - A*b*c + (B*b*d*n - A*b*d)*x)*log((b*x + 
 a)/(d*x + c)))/((b^2*c^2*d - 2*a*b*c*d^2 + a^2*d^3)*g*i^2*x + (b^2*c^3 - 
2*a*b*c^2*d + a^2*c*d^2)*g*i^2)
 
3.2.47.6 Sympy [F(-1)]

Timed out. \[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(a g+b g x) (c i+d i x)^2} \, dx=\text {Timed out} \]

input
integrate((A+B*ln(e*((b*x+a)/(d*x+c))**n))/(b*g*x+a*g)/(d*i*x+c*i)**2,x)
 
output
Timed out
 
3.2.47.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 424 vs. \(2 (164) = 328\).

Time = 0.21 (sec) , antiderivative size = 424, normalized size of antiderivative = 2.55 \[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(a g+b g x) (c i+d i x)^2} \, dx=B {\left (\frac {1}{{\left (b c d - a d^{2}\right )} g i^{2} x + {\left (b c^{2} - a c d\right )} g i^{2}} + \frac {b \log \left (b x + a\right )}{{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} g i^{2}} - \frac {b \log \left (d x + c\right )}{{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} g i^{2}}\right )} \log \left (e {\left (\frac {b x}{d x + c} + \frac {a}{d x + c}\right )}^{n}\right ) - \frac {{\left ({\left (b d x + b c\right )} \log \left (b x + a\right )^{2} + {\left (b d x + b c\right )} \log \left (d x + c\right )^{2} + 2 \, b c - 2 \, a d + 2 \, {\left (b d x + b c\right )} \log \left (b x + a\right ) - 2 \, {\left (b d x + b c + {\left (b d x + b c\right )} \log \left (b x + a\right )\right )} \log \left (d x + c\right )\right )} B n}{2 \, {\left (b^{2} c^{3} g i^{2} - 2 \, a b c^{2} d g i^{2} + a^{2} c d^{2} g i^{2} + {\left (b^{2} c^{2} d g i^{2} - 2 \, a b c d^{2} g i^{2} + a^{2} d^{3} g i^{2}\right )} x\right )}} + A {\left (\frac {1}{{\left (b c d - a d^{2}\right )} g i^{2} x + {\left (b c^{2} - a c d\right )} g i^{2}} + \frac {b \log \left (b x + a\right )}{{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} g i^{2}} - \frac {b \log \left (d x + c\right )}{{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} g i^{2}}\right )} \]

input
integrate((A+B*log(e*((b*x+a)/(d*x+c))^n))/(b*g*x+a*g)/(d*i*x+c*i)^2,x, al 
gorithm="maxima")
 
output
B*(1/((b*c*d - a*d^2)*g*i^2*x + (b*c^2 - a*c*d)*g*i^2) + b*log(b*x + a)/(( 
b^2*c^2 - 2*a*b*c*d + a^2*d^2)*g*i^2) - b*log(d*x + c)/((b^2*c^2 - 2*a*b*c 
*d + a^2*d^2)*g*i^2))*log(e*(b*x/(d*x + c) + a/(d*x + c))^n) - 1/2*((b*d*x 
 + b*c)*log(b*x + a)^2 + (b*d*x + b*c)*log(d*x + c)^2 + 2*b*c - 2*a*d + 2* 
(b*d*x + b*c)*log(b*x + a) - 2*(b*d*x + b*c + (b*d*x + b*c)*log(b*x + a))* 
log(d*x + c))*B*n/(b^2*c^3*g*i^2 - 2*a*b*c^2*d*g*i^2 + a^2*c*d^2*g*i^2 + ( 
b^2*c^2*d*g*i^2 - 2*a*b*c*d^2*g*i^2 + a^2*d^3*g*i^2)*x) + A*(1/((b*c*d - a 
*d^2)*g*i^2*x + (b*c^2 - a*c*d)*g*i^2) + b*log(b*x + a)/((b^2*c^2 - 2*a*b* 
c*d + a^2*d^2)*g*i^2) - b*log(d*x + c)/((b^2*c^2 - 2*a*b*c*d + a^2*d^2)*g* 
i^2))
 
3.2.47.8 Giac [A] (verification not implemented)

Time = 1.05 (sec) , antiderivative size = 208, normalized size of antiderivative = 1.25 \[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(a g+b g x) (c i+d i x)^2} \, dx=\frac {1}{2} \, {\left (\frac {B b n \log \left (\frac {b x + a}{d x + c}\right )^{2}}{b c g i^{2} - a d g i^{2}} - \frac {2 \, {\left (b x + a\right )} B d n \log \left (\frac {b x + a}{d x + c}\right )}{{\left (b c g i^{2} - a d g i^{2}\right )} {\left (d x + c\right )}} + \frac {2 \, {\left (B b \log \left (e\right ) + A b\right )} \log \left (\frac {b x + a}{d x + c}\right )}{b c g i^{2} - a d g i^{2}} + \frac {2 \, {\left (B d n - B d \log \left (e\right ) - A d\right )} {\left (b x + a\right )}}{{\left (b c g i^{2} - a d g i^{2}\right )} {\left (d x + c\right )}}\right )} {\left (\frac {b c}{{\left (b c - a d\right )}^{2}} - \frac {a d}{{\left (b c - a d\right )}^{2}}\right )} \]

input
integrate((A+B*log(e*((b*x+a)/(d*x+c))^n))/(b*g*x+a*g)/(d*i*x+c*i)^2,x, al 
gorithm="giac")
 
output
1/2*(B*b*n*log((b*x + a)/(d*x + c))^2/(b*c*g*i^2 - a*d*g*i^2) - 2*(b*x + a 
)*B*d*n*log((b*x + a)/(d*x + c))/((b*c*g*i^2 - a*d*g*i^2)*(d*x + c)) + 2*( 
B*b*log(e) + A*b)*log((b*x + a)/(d*x + c))/(b*c*g*i^2 - a*d*g*i^2) + 2*(B* 
d*n - B*d*log(e) - A*d)*(b*x + a)/((b*c*g*i^2 - a*d*g*i^2)*(d*x + c)))*(b* 
c/(b*c - a*d)^2 - a*d/(b*c - a*d)^2)
 
3.2.47.9 Mupad [B] (verification not implemented)

Time = 1.49 (sec) , antiderivative size = 241, normalized size of antiderivative = 1.45 \[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(a g+b g x) (c i+d i x)^2} \, dx=\frac {B\,n}{g\,i^2\,\left (a\,d-b\,c\right )\,\left (c+d\,x\right )}-\frac {A}{g\,i^2\,\left (a\,d-b\,c\right )\,\left (c+d\,x\right )}-\frac {B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )}{g\,i^2\,\left (a\,d-b\,c\right )\,\left (c+d\,x\right )}+\frac {B\,b\,{\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )}^2}{2\,g\,i^2\,n\,{\left (a\,d-b\,c\right )}^2}-\frac {A\,b\,\mathrm {atan}\left (\frac {a\,d\,1{}\mathrm {i}+b\,c\,1{}\mathrm {i}+b\,d\,x\,2{}\mathrm {i}}{a\,d-b\,c}\right )\,2{}\mathrm {i}}{g\,i^2\,{\left (a\,d-b\,c\right )}^2}+\frac {B\,b\,n\,\mathrm {atan}\left (\frac {a\,d\,1{}\mathrm {i}+b\,c\,1{}\mathrm {i}+b\,d\,x\,2{}\mathrm {i}}{a\,d-b\,c}\right )\,2{}\mathrm {i}}{g\,i^2\,{\left (a\,d-b\,c\right )}^2} \]

input
int((A + B*log(e*((a + b*x)/(c + d*x))^n))/((a*g + b*g*x)*(c*i + d*i*x)^2) 
,x)
 
output
(B*n)/(g*i^2*(a*d - b*c)*(c + d*x)) - A/(g*i^2*(a*d - b*c)*(c + d*x)) - (B 
*log(e*((a + b*x)/(c + d*x))^n))/(g*i^2*(a*d - b*c)*(c + d*x)) - (A*b*atan 
((a*d*1i + b*c*1i + b*d*x*2i)/(a*d - b*c))*2i)/(g*i^2*(a*d - b*c)^2) + (B* 
b*n*atan((a*d*1i + b*c*1i + b*d*x*2i)/(a*d - b*c))*2i)/(g*i^2*(a*d - b*c)^ 
2) + (B*b*log(e*((a + b*x)/(c + d*x))^n)^2)/(2*g*i^2*n*(a*d - b*c)^2)